Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Update error message if redis extension is not loaded #30673

Merged
merged 2 commits into from
Nov 25, 2019
Merged

[6.x] Update error message if redis extension is not loaded #30673

merged 2 commits into from
Nov 25, 2019

Conversation

ericdowell
Copy link
Contributor

Based on #29864 I would say it is time for better error messages than what has always been provided (pre-6.x).

After spending around 30 minutes to an hour figuring out that the PHP Redis extension was installed but not enabled I found myself displeased with the unhelpful default error message. To help all future developers we should be detecting if redis extension is not loaded and then provide a more helpful message.

Given the class PhpRedisConnector is only used for the phpredis driver, no checks other than !extension_loaded('redis') is needed.

Tested on machine without extension loaded:

forge@solitary-thunder:~$ php -a
Interactive mode enabled

php > var_dump(extension_loaded('redis'));
bool(false)
php >

and one with the extension loaded:

forge@fathomless-breeze:~$ php -a
Interactive mode enabled

php > var_dump(extension_loaded('redis'));
bool(true)
php >

@taylorotwell taylorotwell merged commit b28acda into laravel:6.x Nov 25, 2019
@ericdowell ericdowell deleted the php-redis-extension-exception branch November 28, 2019 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants